package com.yuandian.api.management.feign;

import com.yuandian.api.management.po.OptionParams;
import com.yuandian.api.management.vo.OptionVo;
import com.yuandian.bpm.common.core.constant.SecurityConstants;
import com.yuandian.bpm.common.core.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 说明：远程调用选项接口服务
 * @Author zfsn
 * @Date 2023/2/6 16:06
 */
@FeignClient(contextId = "remoteOptionService", value = "bpm-management")
public interface RemoteOptionService {

	/**
	 * 查询系统选项
	 *
	 * @param params 选项请求参数
	 * @return 统一响应
	 */
	@GetMapping("/option/system")
	R<List<OptionVo>> system(@RequestParam(value = "params") OptionParams params);

	/**
	 * 查询网端选项
	 *
	 * @param params 选项请求参数
	 * @return 统一响应
	 */
	@GetMapping("/option/segment")
	R<List<OptionVo>> segment(OptionParams params);

	/**
	 *	查询菜单映射关系
	 * @return 统一响应
	 */
	@GetMapping("/option/buttonMap")
	R<List<OptionVo>> getButtonMap();
	@GetMapping("/innerInterface/buttonMap")
	R<List<OptionVo>> getButtonMap(@RequestHeader(SecurityConstants.FROM) String from);
}
